<?php

Yii::setPathOfAlias('bootstrap', dirname(__FILE__) . '/../extensions/bootstrap');
return CMap::mergeArray(require(dirname(__FILE__) . '/main.php'), array(
            'name' => 'TTDT',
            'preload' => array('bootstrap'),
            'components' => array(
                'bootstrap' => array(
                    'class' => 'bootstrap.components.Bootstrap',
                    'responsiveCss' => true,
                ),
                'user' => array(
                    'loginUrl' => array('site/login'),
                    'allowAutoLogin' => true,
                ),
                'urlManager' => array(
                    'urlFormat' => 'path',
                    'showScriptName' => false,
                    'rules' => array(
                        'admin' => 'site/index',
                        'admin/login' => 'site/login',
                        'admin/<controller>' => '<controller>/index',
                        'admin/<controller:\w+>/<id:\d+>' => '<controller>/view',
                        'admin/<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
                        'admin/<controller:\w+>/<action:\w+>' => '<controller>/<action>',
                    ),
                ),
                'errorHandler' => array(
                    // use 'site/error' action to display errors
                    'errorAction' => 'site/error',
                )
            )
        ));
